package com.springcloud.mapper;

import com.baomidou.mybatisplus.mapper.BaseMapper;
import com.springcloud.model.SysResource;
import com.springcloud.model.SysRole;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 *
 * SysResource 表数据库控制层接口
 *
 */
@Mapper
public interface SysResourceMapper extends BaseMapper<SysResource> {

	List<SysResource> selectAllByTypeAndPIdNull(@Param("resourceType") Integer resourceType);

	List<SysResource> selectAllByTypeAndPId(@Param("resourceType") Integer resourceType, @Param("pId") Long pId);

	List<SysResource> selectAll();

	List<SysResource> selectResourceByRoleIds(List roleIds);

}